package com.five.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.five.admin.dto.ProductQueryDto;
import com.five.admin.vo.ProductAdminVo;
import com.five.admin.vo.ProductDetailsVo;
import com.five.pojo.entity.Product;
import com.five.pojo.vo.MobileProductListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper extends BaseMapper<Product> {
    MobileProductListVo listProductById(Long id);

    List<MobileProductListVo> listProducts();

    List<MobileProductListVo> queryProductByCategoryId(Long categoryId);

    ProductDetailsVo queryById(Long id);

    List<String> queryImagesByProductId(Long id);

    Page<ProductAdminVo> queryList(Page page,@Param("queryDto") ProductQueryDto queryDto);

    List<MobileProductListVo> queryProductByProductName(String productName);
}
